package uk.co.caistealcourt.intellij.plugins.mavenone;

import javax.swing.*;

public class FirstAppConfiguration {
    private JPanel panel1;
    private JTextField phraseField;
    private JLabel phraseLabel;

    public void setData(FirstAppComponent data) {
        phraseField.setText(data.getPhrase());
    }

    public void getData(FirstAppComponent data) {
        data.setPhrase(phraseField.getText());
    }

    public boolean isModified(FirstAppComponent data) {
        return phraseField.getText() != null ? !phraseField.getText().equals(data.getPhrase()) : data.getPhrase() != null;
    }

    public JComponent getRootComponent() {
        return panel1;
    }
}
